<?php

class Silk_Pms_ActivityController extends Mage_Core_Controller_Front_Action
{

    public function viewAction()
    {
        $id = $this->getRequest()->getParam('id');
        $activity = Mage::getModel('pms/activity')->load($id);
        if(!$activity || !$activity->getId())
        {
            echo "活动不存在！";
            return;
        }
        echo $this->getLayout()
            ->createBlock("pms/activity_".$activity->getTemplateId())
            ->toHtml();
    }
}